// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import Router from 'vue-router'
import BootstrapVue from 'bootstrap-vue'
import 'bootstrap/dist/css/bootstrap.css'
import 'bootstrap-vue/dist/bootstrap-vue.css'
import axios from 'axios'
import ElementUI from 'element-ui'
import store from './store' // 引入 Vuex 状态管理
import 'element-ui/lib/theme-chalk/index.css';

// import qs from 'qs'

Vue.config.productionTip = false
Vue.prototype.$ajax = axios
// Vue.prototype.$qs = qs
Vue.use(BootstrapVue)
Vue.use(ElementUI)


const originalPush = Router.prototype.push
Router.prototype.push = function push(location) {
  return originalPush.call(this, location).catch(err => err)
}

/* eslint-disable no-new */
new Vue({
  router,
  store,
  render: h => h(App)
}).$mount("#app")
